package com.jjsj.mall.shop.service.impl;

import com.jjsj.mall.shop.entity.YoshopOrderReceipte;
import com.jjsj.mall.shop.mapper.YoshopOrderReceipteMapper;
import com.jjsj.mall.shop.service.IYoshopOrderReceipteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单发票Service业务层处理
 *
 * @author www.joolun.com
 * @date 2022-10-24
 */
@Service
public class YoshopOrderReceipteServiceImpl implements IYoshopOrderReceipteService {
    @Autowired
    private YoshopOrderReceipteMapper yoshopOrderReceipteMapper;

    /**
     * 查询订单发票
     *
     * @param orderReceipteId 订单发票ID
     * @return 订单发票
     */
    @Override
    public YoshopOrderReceipte selectYoshopOrderReceipteById(String orderReceipteId) {
        return yoshopOrderReceipteMapper.selectYoshopOrderReceipteById(orderReceipteId);
    }

    /**
     * 查询订单发票列表
     *
     * @param yoshopOrderReceipte 订单发票
     * @return 订单发票
     */
    @Override
    public List<YoshopOrderReceipte> selectYoshopOrderReceipteList(YoshopOrderReceipte yoshopOrderReceipte) {
        return yoshopOrderReceipteMapper.selectYoshopOrderReceipteList(yoshopOrderReceipte);
    }

    /**
     * 新增订单发票
     *
     * @param yoshopOrderReceipte 订单发票
     * @return 结果
     */
    @Override
    public int insertYoshopOrderReceipte(YoshopOrderReceipte yoshopOrderReceipte) {
        return yoshopOrderReceipteMapper.insertYoshopOrderReceipte(yoshopOrderReceipte);
    }

    /**
     * 修改订单发票
     *
     * @param yoshopOrderReceipte 订单发票
     * @return 结果
     */
    @Override
    public int updateYoshopOrderReceipte(YoshopOrderReceipte yoshopOrderReceipte) {
        return yoshopOrderReceipteMapper.updateYoshopOrderReceipte(yoshopOrderReceipte);
    }

    /**
     * 批量删除订单发票
     *
     * @param orderReceipteIds 需要删除的订单发票ID
     * @return 结果
     */
    @Override
    public int deleteYoshopOrderReceipteByIds(String[] orderReceipteIds) {
        return yoshopOrderReceipteMapper.deleteYoshopOrderReceipteByIds(orderReceipteIds);
    }

    /**
     * 删除订单发票信息
     *
     * @param orderReceipteId 订单发票ID
     * @return 结果
     */
    @Override
    public int deleteYoshopOrderReceipteById(String orderReceipteId) {
        return yoshopOrderReceipteMapper.deleteYoshopOrderReceipteById(orderReceipteId);
    }
}
